<?$categories=$this->categories;
  if ($categories)
  {?>
      <ul data-role="listview"  data-inset="true" >
          <li>
                <div class="ui-bar ui-bar-b">
                              Выберите категорию:
                </div>
           </li>
                 <? foreach ($categories as $category)
                  {
                      echo "<li><a href='/mobile/addadv/id/".$category['id']."'>".$category['name']."</a></li>";
                  }?>
      </ul>
      <?
  }

?>